package com.hehui.partimejob.items.body;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

public class RegisterBean {


    /**
     * user
     */ /**
     * user : {"username":"admin1323323","password":"123456","phone":"18481834524","email":"1611993222@qq.com"}
     * cid : 2
     * code : 918093
     */

    private UserBean user;
    /**
     * cid
     */
    private double cid;
    /**
     * code
     */
    private String code;

    public static RegisterBean objectFromData(String str) {

        return new Gson().fromJson(str, RegisterBean.class);
    }

    public static List<RegisterBean> arrayRegisterBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<RegisterBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public double getCid() {
        return cid;
    }

    public void setCid(double cid) {
        this.cid = cid;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
